package lesson15;

public class ConstructorsExample 
{
	public static void main(String[] args) {
		
		Person someone = new Person("John Doe");
		
		Person noOne = new Person();
		
		Person p1 = new Person("Ivan", 10);
		System.out.println(p1.name);
		System.out.println(p1.age);
		
		Car myCar1 = new Car();
		myCar1.printCarInfo();
		Car myCar2 = new Car("Golf");
		myCar2.printCarInfo();
		Car myCar3 = new Car("Golf", "Black");
		myCar3.printCarInfo();
		Car myCar4 = new Car("Ferari", true, "Red", 100_000, 230);
		myCar4.printCarInfo();
		myCar4.isMoreExpensive(myCar1);
	}
	
	
}
